﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Formboard.Request
{
    public class RetrieveABoardToPlayRequest
    {

        public RetrieveABoardToPlayRequest()
        {
        }
        public RetrieveBoardDescription board = new RetrieveBoardDescription();

        public class RetrieveBoardDescription
        {
            public RetrieveBoardDescription() { }
            public FieldWithStringValue name = new FieldWithStringValue();
            public FieldWithStringValue creation_date = new FieldWithStringValue();
            public FieldWithStringValue owner = new FieldWithStringValue();
            public FieldWithStringValue invitee = new FieldWithStringValue();
            public FieldWithStringValue status = new FieldWithStringValue();
            public FieldWithStringValue size = new FieldWithStringValue();
            public FieldWithBoolValue owner_white = new FieldWithBoolValue();
            [XmlArrayItem("move")]
            public List<Move> moves = new List<Move>();
        }


        public class Move
        {
            public Move() { }
            public Move(int a, int b, int c)
            {
                seq = a;
                row = b;
                column = c;
            }
            [XmlAttribute("seq")]
            public int seq ;
            [XmlAttribute("row")]
            public int row;
            [XmlAttribute("column")]
            public int column;
            
        }

        public class FieldWithStringValue
        {
            [XmlAttribute("value")]
            public string value;
        }
        public class FieldWithBoolValue
        {
            [XmlAttribute("value")]
            public bool value;
        }
    }
}
